using System;
using JsonFx.Json;
using UnityEngine;

namespace BMCommon
{
	public class SceneGraph
	{
		public static SceneGraph Get
		{
			get
			{
				SceneGraph result = null;
				TextAsset textAsset = Resources.Load("SceneGraph", typeof(TextAsset)) as TextAsset;
				if (textAsset == null)
				{
					UnityEngine.Debug.LogError("SceneGraph.txt is not exist");
					return null;
				}
				try
				{
					result = JsonReader.Deserialize<SceneGraph>(textAsset.text);
				}
				catch (JsonDeserializationException ex)
				{
					int num;
					int num2;
					ex.GetLineAndColumn(textAsset.text, out num, out num2);
					UnityEngine.Debug.LogError(string.Concat(new object[]
					{
						"SceneGraph JsonDeserializationException : ",
						ex.Message,
						" on Line:",
						num,
						"  Col:",
						num2
					}));
				}
				return result;
			}
		}

		public SceneGraph.UnityScene[] uScenes;

		public class UnityScene
		{
			public string name;

			public string[] scenes;

			public string[] popups;
		}
	}
}
